﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL.Service.admin;
using DAL.Service.admin.Impl;
using System.Collections;

namespace BIZ
{
    public class sectionsOper
    {
        ISectionsService sectionService = new SectionsServiceImpl();
        public IList getList()
        {
            return sectionService.getList();
        }

        public int getCount(object id)
        {
            return sectionService.getCount(id);
        }

        public IList getListByPId(int pid)
        {
            return sectionService.getListByPId(pid);
        }

        public int deleteFromSections(int id)
        {
            return sectionService.deleteFromSections(id);
        }

        public int checkcode(string code, int id)
        {
            return sectionService.checkcode(code, id);
        }

        public object sava(object entity)
        {
            return sectionService.save(entity);
        }

        public IList getSectionById(string id)
        {
            return sectionService.getSectionById(id);
        }

        public IList getParentList()
        {
            return sectionService.getParentList();
        }

        /// <summary>
        /// 根据栏目编码查询栏目名称
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public IList getNameByCode(string code)
        {
            return sectionService.getNameByCode(code);
        }
    }
}
